package Servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Util.SendRequest;
import model.VUser;
import persistent.dao.UserDAO;
import persistent.impl.UserDAOImpl;

public class AddBlogerUserCtrServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		String userid=request.getParameter("userid");
		UserDAO udao=new UserDAOImpl();
		VUser user=udao.getVUserById(userid);
		request.setAttribute("user", user);
		SendRequest.sendDispatcherForward("addblogeruser.jsp", request, response);

	}


	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request, response);
 
	}

}
